package org.act.BPEL2Automata.automata.module;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;

/**
 * 
 * <b>StatePair</b> consists of two states and one flag to show 
 * whether the state-pair is bisimilar or not.  
 * @author baoxiwu<bb@feijiao.info>,ACT,Beihang University
 * @version 0.9.0
 * @since 2010-04-27
 * 
 */
public class StatePair {
	//TODO remove
	private Color color = null;
	private State stateX = null;
	private State stateY = null;
	private boolean isBisimilar = true; 
	
	public StatePair(){
	//empty
	}
	
	public StatePair(State stateX,State stateY){
		this.color = Display.getDefault().getSystemColor(SWT.COLOR_BLACK);
		this.stateX = stateX;
		this.stateY = stateY;
		this.isBisimilar = true;
	}
	
	public StatePair(State stateX,State stateY,boolean isBisimilar){
		this.color = Display.getDefault().getSystemColor(SWT.COLOR_BLACK);
		this.stateX = stateX;
		this.stateY = stateY;
		this.isBisimilar = isBisimilar;
	}
	
	public StatePair(State stateX,State stateY,boolean isBisimilar,Color color){
		this.color = color;
		this.stateX = stateX;
		this.stateY = stateY;
		this.isBisimilar = isBisimilar;
	}
	
	
	//setter and getter methods.
	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}
	
	public void setStateX(State stateX){
		this.stateX = stateX;
	}

	public State getStateX(){
		return this.stateX;
	}
	
	public void setStateY(State stateY){
		this.stateY = stateY;
	}
	
	public State getStateY(){
		return this.stateY;
	}
	
	public void setIsBisimilar(boolean isBisimilar){
		this.isBisimilar = isBisimilar;
	}
	
	public boolean getIsBisimilar(){
		return this.isBisimilar;
	}
	
	//TODO
	public String toString(){
		return ("s" + this.getStateX().getID() + " & s" + this.getStateY().getID() + " IsBisimilar = " + this.getIsBisimilar());
	}
}
